home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / bin / user-params < prev    next >
Encoding:
Text File  |  2007-02-15  |  1.4 KB  |  74 lines

  1. #!/bin/sh
  2. CMDLINE=/proc/cmdline
  3. for item in $(cat $CMDLINE); do
  4.     var="${item%=*}"
  5.     
  6.     # BOOT_IMAGE is added by syslinux.
  7.     if [ "$var" = "BOOT_IMAGE" ]; then
  8.         continue
  9.     fi
  10.     
  11.     # init is not generally useful to pass on.
  12.     if [ "$var" = init ]; then
  13.         continue
  14.     fi
  15.  
  16.     # brltty settings shouldn't be passed since
  17.     # they are already recorded in /etc/brltty.conf
  18.     if [ "$var" = brltty ]; then
  19.         continue
  20.     fi
  21.  
  22.     # ks is only useful to kickseed in the first stage.
  23.     if [ "$var" = ks ]; then
  24.         continue
  25.     fi
  26.  
  27.     # We don't believe that vga= is needed to display a console any more
  28.     # now that we've switched to 640x400 by default, and it breaks
  29.     # suspend/resume. People can always type it in again at the
  30.     # installed boot loader if need be.
  31.     if [ "$var" = vga ]; then
  32.         continue
  33.     fi
  34.  
  35.     # Skip debconf variables.
  36.     varnoslash="${var##*/*}"
  37.     if [ "$varnoslash" = "" ]; then
  38.         continue
  39.     fi
  40.     
  41.     # Skip module-specific variables.
  42.     varnodot="${var##*.*}"
  43.     if [ "$varnodot" = "" ]; then
  44.         continue
  45.     fi
  46.     
  47.     # Skip preseed aliases.
  48.     if [ -e /etc/preseed_aliases ] && \
  49.        grep -q "^$var[[:space:]]" /etc/preseed_aliases; then
  50.         continue
  51.     fi
  52.     
  53.     if [ "$item" = "--" ]; then
  54.         inuser=1
  55.         collect=""
  56.     elif [ "$inuser" ]; then
  57.         if [ -z "$collect" ]; then
  58.             collect="$item"
  59.         else
  60.             collect="$collect $item"
  61.         fi
  62.     fi
  63. done
  64.  
  65. # Include default parameters.
  66. RET=`debconf-get debian-installer/add-kernel-opts || true`
  67. if [ "$RET" ]; then
  68.         collect="$collect $RET"
  69. fi
  70.  
  71. for word in $collect; do
  72.     echo "$word"
  73. done
  74.